package com.mdoya.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.mdoya.domain.Employee;
import com.mdoya.query.EmployeeQuery;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author mdoya
 * @version 1.0
 * @description:
 */
@Transactional(propagation = Propagation.REQUIRED)
public interface EmployeeService {
    /**
     *  员工登录
     * @param employee
     * @return
     */
    Employee login(Employee employee);


    /**
     *  传参对象参数
     * @return
     */
    IPage<Employee> selectPage(EmployeeQuery employeeQuery);

    /**
     *  添加
     * @param employee
     * @return
     */
    Integer insert(Employee employee,Long empId);

    /**
     *  根据id查询员工信息
     * @param id 员工id
     * @return
     */
    Employee selectById(String id);

    /**
     *  修改员工
     * @param employee 被员工员工对象
     * @param empId 操作人id
     * @return
     */
    Integer updateById(Employee employee, Long empId);
}
